package com.jichaoyun.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.jichaoyun.model.entity.DcAlarm;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jichaoyun.model.entity.PowerAlarm;
import com.jichaoyun.model.vo.AlarmVo;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Collection;
import java.util.List;
import java.util.Map;

/**
* @author ljc
* @description 针对表【dcAlarm】的数据库操作Service
* @createDate 2023-11-29 14:35:11
*/
public interface DcAlarmService extends IService<DcAlarm> {

    /**
     * 报警信息已读接口
     */
    void MakeAlarmRead(Integer id,Integer userId);


    void MakeAlarmRead(Integer userId);
    /**
     * 查询未读的报警信息
     * @return
     */
    List<Map<String,Object>> pollingDb(Integer userId);

    /**
     * 各项报警数量
     * @return
     */
    Map<String, Long> eachAlarmProportion();
    /**
     * 获取线路直流报警信息
     * @param line_name
     * @param date
     * @param pageNo
     * @return
     */
    IPage<List<AlarmVo>> getDcAlarmAlarm(String line_name, String date, Integer pageNo);

    /**
     * 获取站点直流报警信息
     * @param station
     * @param date
     * @return
     */
    Map<String, List<DcAlarm>> getDcAlarmInfo(Integer station, String date);

    List<Map<String,Object>> getAllDcAlarm(String line_name, String date);

    void getAlarmExcel(String line_name, String date, HttpServletResponse response) throws IOException;

    List<Map<String,Object>> polling(Integer userId);
    List<Map<String,Object>> polling(Integer userId,String date,String lineName);
}
